import { _decorator, Vec2} from 'cc';
import { ColorMem } from './colorMem';
const { ccclass,property } = _decorator;

@ccclass('MVec2')
export class MVec2 {
    X: number;
    Y: number;

    constructor(X:number,Y: number) {
        this.X = X
        this.Y = Y
    }


    add(v: MVec2):MVec2 {
        return new MVec2(this.X + v.X, this.Y + v.Y)
    }
}